package homework_6.read_1;

import java.io.*;
import java.net.*;


public class Client {
    private Socket client;
    public OutputStream out;

    public Client(String host, int port) {
        try {
            client = new Socket(host, port);
            out = client.getOutputStream();
            out.write("this is a message".getBytes());
            client.shutdownOutput();
        }
        catch (IOException e) {
            System.out.println("IOEx: " + e);
        }
    }

    public static void main(String[] args) {
        new Client("client",8001);
    }
}

